package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysProjectScheduleMapper;
import com.ruoyi.system.domain.SysProjectSchedule;
import com.ruoyi.system.service.ISysProjectScheduleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 智慧进度Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-20
 */
@Service
public class SysProjectScheduleServiceImpl implements ISysProjectScheduleService 
{
    @Autowired
    private SysProjectScheduleMapper sysProjectScheduleMapper;

    /**
     * 查询智慧进度
     * 
     * @param id 智慧进度主键
     * @return 智慧进度
     */
    @Override
    public SysProjectSchedule selectSysProjectScheduleById(Integer id)
    {
        return sysProjectScheduleMapper.selectSysProjectScheduleById(id);
    }

    /**
     * 查询智慧进度列表
     * 
     * @param sysProjectSchedule 智慧进度
     * @return 智慧进度
     */
    @Override
    public List<SysProjectSchedule> selectSysProjectScheduleList(SysProjectSchedule sysProjectSchedule)
    {
        return sysProjectScheduleMapper.selectSysProjectScheduleList(sysProjectSchedule);
    }

    /**
     * 新增智慧进度
     * 
     * @param sysProjectSchedule 智慧进度
     * @return 结果
     */
    @Override
    public int insertSysProjectSchedule(SysProjectSchedule sysProjectSchedule)
    {
        sysProjectSchedule.setCreateTime(DateUtils.getNowDate());
        return sysProjectScheduleMapper.insertSysProjectSchedule(sysProjectSchedule);
    }

    /**
     * 修改智慧进度
     * 
     * @param sysProjectSchedule 智慧进度
     * @return 结果
     */
    @Override
    public int updateSysProjectSchedule(SysProjectSchedule sysProjectSchedule)
    {
        sysProjectSchedule.setUpdateTime(DateUtils.getNowDate());
        return sysProjectScheduleMapper.updateSysProjectSchedule(sysProjectSchedule);
    }

    /**
     * 批量删除智慧进度
     * 
     * @param ids 需要删除的智慧进度主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectScheduleByIds(String ids)
    {
        return sysProjectScheduleMapper.deleteSysProjectScheduleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除智慧进度信息
     * 
     * @param id 智慧进度主键
     * @return 结果
     */
    @Override
    public int deleteSysProjectScheduleById(Integer id)
    {
        return sysProjectScheduleMapper.deleteSysProjectScheduleById(id);
    }
}
